<?php

namespace common\models\farmerhouse;

use Yii;

/**
 * This is the model class for table "farmerhouse_travels_detail".
 *
 * @property string $id
 * @property integer $travelid
 * @property integer $station
 * @property string $address
 * @property integer $day
 * @property string $picture
 * @property string $content
 */
class FarmerhouseTravelsDetail extends \yii\db\ActiveRecord
{


    //主要用于日志记录
    public $uselog = [
        'tabcomment' => '农家乐游记',      //用于修改了什么的显示
        'mainfield' => 'id',      //主要的显示标题的字段
        'picturefield' => ['picture'],        //图片字段
        'timefield' => [],       //时间字段
        'unsetfiled' =>[],      //不需要记录的字段
    ];


    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'farmerhouse_travels_detail';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['travelid', 'station', 'address', 'day', 'picture', 'content'], 'required'],
            [['travelid', 'station', 'day'], 'integer'],
            [['address'], 'string', 'max' => 255],
            [['picture', 'content'], 'string', 'max' => 5000],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'travelid' => 'Travelid',
            'station' => '第几站',
            'address' => '站点地址',
            'day' => '第几天',
            'picture' => '图集',
            'content' => '内容',
        ];
    }
}
